home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / Plug-in - DistanceProxyGroup / header / dpgSortedArray.h < prev   
Encoding:
C/C++ Source or Header  |  1997-08-14  |  1.3 KB  |  62 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        dpgSortedArray.h                                         **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **                                                                          **
  7.  **                                                                          **
  8.  **                                                                          **
  9.  **     Copyright (C) 1996-1996 Apple Computer, Inc.  All rights reserved.     **
  10.  **                                                                          **
  11.  **                                                                          **
  12.  *****************************************************************************/
  13.  
  14. #ifndef dpgSortedArray_h
  15. #define dpgSortedArray_h
  16.  
  17. #if PRAGMA_ONCE
  18.     #pragma once
  19. #endif
  20.  
  21. #include "QD3D.h"
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif /*  __cplusplus  */
  26.  
  27. typedef long (*dpgCompareFunction)(
  28.     void        *key,
  29.     void        *arrayElement);
  30.  
  31. TQ3Boolean dpgSortedArray_Search(
  32.     void                *key,
  33.     void                *array,
  34.     unsigned long        nElems,
  35.     unsigned long        elemSize,
  36.     dpgCompareFunction    compare,
  37.     unsigned long        *position);
  38.  
  39. TQ3Status dpgSortedArray_Resize(
  40.     void                **array,
  41.     unsigned long        nElems,
  42.     unsigned long        elemSize);
  43.  
  44. void dpgSortedArray_InsertElement(
  45.     void                *array,
  46.     unsigned long        nElems,
  47.     unsigned long        elemSize,
  48.     void                *newElem,
  49.     unsigned long        position);
  50.  
  51. void dpgSortedArray_DeleteElement(
  52.     void                *array,
  53.     unsigned long        nElems,
  54.     unsigned long        elemSize,
  55.     void                *oldElement,    /* Can be NULL */
  56.     unsigned long        position);
  57.  
  58. #ifdef __cplusplus
  59. }
  60. #endif /*  __cplusplus  */
  61.  
  62. #endif